/**
 * @desc 配置本地开发配置，包括api、代理等配置
 */
const address = require("./address.config")
module.exports = {
	// api统一前缀，axios中的baseURL
	apiPrefix: address.API_ADDRESS,
	apiPrefixImg: address.IMG_ADDRESS,
	apiPrefixUpload: address.UPLOAD_ADDRESS,
	apiPrefixWSS: address.WSS_ADDRESS,
	//富文本上传路径
	ckeditorUpload: address.CKEDITOR_ADDRESS,
	// 前台api代理规则，项目部署时需要在服务器配置相同的反向代理
	apiProxy: {
		"/api": {
			target: address.API_ADDRESS,
			// 重写路径，去掉/api
			pathRewrite: {
				"/api": ""
			},
			changeOrigin: true,
			secure: false,
		},
		'/accessToken': {
			target: 'https://openapi.lechange.cn:443/openapi/accessToken', // 真实地址
			changeOrigin: true,
			secure: false,
			pathRewrite: {
				'/accessToken': ''
			}
		},
		'/getKitToken': {
			target: 'https://openapi.lechange.cn:443/openapi/getKitToken', // 真实地址
			changeOrigin: true,
			secure: false,
			pathRewrite: {
				'/getKitToken': ''
			}
		}
	}
}
